package com.example.design.ddd.practice.domain.orgmng.factory;

import com.example.design.ddd.practice.domain.common.validator.CommonValidator;
import com.example.design.ddd.practice.domain.orgmng.factory.OrgBuilder;
import com.example.design.ddd.practice.domain.orgmng.orgservice.OrgLeaderValidator;
import com.example.design.ddd.practice.domain.orgmng.orgservice.OrgNameValidator;
import com.example.design.ddd.practice.domain.orgmng.orgservice.OrgTypeValidator;
import com.example.design.ddd.practice.domain.orgmng.orgservice.SuperiorValidator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author liuzhihui
 * @Date 2024/6/3
 */
@Component
public class OrgBuilderFactory {
    @Autowired
    CommonValidator commonValidator;

    @Autowired
    OrgTypeValidator orgTypeValidator;

    @Autowired
    SuperiorValidator superiorValidator;

    @Autowired
    OrgNameValidator orgNameValidator;

    @Autowired
    OrgLeaderValidator orgLeaderValidator;

    public OrgBuilder create() {
        return new OrgBuilder(commonValidator, orgTypeValidator, superiorValidator, orgNameValidator, orgLeaderValidator);
    }
}
